﻿module Sustainalytics.Common {


    // Home controller
    export class TutorialController {

        //Ctor.
        constructor(
            private $scope: ng.IScope,
            private $modalInstance: Common.IModalInstance,
            public $sce: ng.sanitize.ISanitizeService,
            public title: string,
            public url:string 
        ) {

            //console.log(message);
            var ctx = this;
            $scope['tutorial'] = ctx;

        }

        public trustSrc = function (url) {
            var ctx = this;
            return ctx.$sce.trustAsResourceUrl(url);
        }


        public closeDialog = function() {
            var ctx = this;
            ctx.$modalInstance.close();
        };

    

    }
    angular.module('Sustainalytics.Common').controller('TutorialController', ['$scope', '$modalInstance','$sce','title','url', TutorialController]);

}